package com.pocket.demo.core.log;

import ch.qos.logback.classic.pattern.ClassicConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;

/**
 * logback 线程ID 格式转换器
 *
 * @author cookie.
 **/
public class ThreadIdConverter extends ClassicConverter {
    public String convert(ILoggingEvent event) {
        return String.valueOf(getThreadId());
    }
    public static long getThreadId() {
        return Thread.currentThread().getId();
    }
}
